icon theme: Ensure to propagate an error
authorMatthias Clasen <mclasen@redhat.com>
Tue, 27 Oct 2015 15:05:00 +0000 (11:05 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 27 Oct 2015 15:09:00 +0000 (11:09 -0400)
If the svg pixbuf loader is not available, we end up with criticals
from gtk_css_image_icon_theme_draw because gtk_icon_info_load_symbolic
returns NULL without setting an error.

Avoid this by propagating the load error.

gtk/gtkicontheme.c

index 001dc22b8d0649c28c1fd0ed94dfb35aa18470ed..59e99fc6f75d4e5b17c19abde7e24aba9eb1cf8d 100644 (file)
@@ -4441,7 +4441,11 @@ gtk_icon_info_load_symbolic_svg (GtkIconInfo    *icon_info,
     return NULL;
 
   if (!icon_info_ensure_scale_and_pixbuf (icon_info))
-    return NULL;
+    {
+      g_propagate_error (error, icon_info->load_error);
+      icon_info->load_error = NULL;
+      return NULL;
+    }
 
   if (icon_info->symbolic_width == 0 ||
       icon_info->symbolic_height == 0)